home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-24 | 7.8 KB | 371 lines | [TEXT/MPS ] |
- ;
- ; File: CMMComponent.a
- ;
- ; Contains: ColorSync CMM Components
- ;
- ; Version: Technology: ColorSync 2.0
- ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20
- ;
- ; Copyright: © 1984-1995 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__CMMCOMPONENT__') = 'UNDEFINED' THEN
- __CMMCOMPONENT__ SET 1
-
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- ; include 'ConditionalMacros.a' ;
-
- IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
- include 'Quickdraw.a'
- ENDIF
- ; include 'MixedMode.a' ;
- ; include 'QuickdrawText.a' ;
-
- IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
- include 'Components.a'
- ENDIF
-
- IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
- include 'CMApplication.a'
- ENDIF
- ; include 'Files.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Memory.a' ;
- ; include 'Finder.a' ;
- ; include 'Printing.a' ;
- ; include 'Errors.a' ;
- ; include 'Dialogs.a' ;
- ; include 'Menus.a' ;
- ; include 'Controls.a' ;
- ; include 'Windows.a' ;
- ; include 'Events.a' ;
- ; include 'TextEdit.a' ;
- ; include 'CMICCProfile.a' ;
-
- CMMInterfaceVersion EQU 1
-
- ; Component function selectors
- ; Required
- kCMMInit EQU 0
- kNCMMInit EQU 6
- kCMMMatchColors EQU 1
- kCMMCheckColors EQU 2
-
- ; Optional
- kCMMValidateProfile EQU 8
- kCMMFlattenProfile EQU 14
- kCMMUnflattenProfile EQU 15
- kCMMMatchBitmap EQU 9
- kCMMCheckBitmap EQU 10
- kCMMMatchPixMap EQU 3
- kCMMCheckPixMap EQU 4
- kCMMConcatenateProfiles EQU 5
- kCMMConcatInit EQU 7
- kCMMNewLinkProfile EQU 16
- kCMMGetPS2ColorSpace EQU 11
- kCMMGetPS2ColorRenderingIntent EQU 12
- kCMMGetPS2ColorRendering EQU 13
- kCMMGetPS2ColorRenderingVMSize EQU 17
-
- ;
- ; pascal CMError NCMInit(ComponentInstance CMSession, CMProfileRef srcProfile, CMProfileRef dstProfile)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _NCMInit
- dc.w $2F3C
- dc.w $0008
- dc.w $0006
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION NCMInit
- ENDIF
-
- ;
- ; pascal CMError CMInit(ComponentInstance CMSession, CMProfileHandle srcProfile, CMProfileHandle dstProfile)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMInit
- dc.w $2F3C
- dc.w $0008
- dc.w $0000
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMInit
- ENDIF
-
- ;
- ; pascal CMError CMMatchColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMatchColors
- dc.w $2F3C
- dc.w $0008
- dc.w $0001
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMatchColors
- ENDIF
-
- ;
- ; pascal CMError CMCheckColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count, long *result)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMCheckColors
- dc.w $2F3C
- dc.w $000C
- dc.w $0002
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMCheckColors
- ENDIF
-
- ; Optional functions
- ;
- ; pascal CMError CMMValidateProfile(ComponentInstance CMSession, CMProfileRef prof, Boolean *valid)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMValidateProfile
- dc.w $2F3C
- dc.w $0008
- dc.w $0008
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMValidateProfile
- ENDIF
-
- ;
- ; pascal CMError CMMFlattenProfile(ComponentInstance CMSession, CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMFlattenProfile
- dc.w $2F3C
- dc.w $0010
- dc.w $000E
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMFlattenProfile
- ENDIF
-
- ;
- ; pascal CMError CMMUnflattenProfile(ComponentInstance CMSession, FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMUnflattenProfile
- dc.w $2F3C
- dc.w $000C
- dc.w $000F
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMUnflattenProfile
- ENDIF
-
- ;
- ; pascal CMError CMMatchBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMatchBitmap
- dc.w $2F3C
- dc.w $0010
- dc.w $0009
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMatchBitmap
- ENDIF
-
- ;
- ; pascal CMError CMCheckBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMCheckBitmap
- dc.w $2F3C
- dc.w $0010
- dc.w $000A
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMCheckBitmap
- ENDIF
-
- ;
- ; pascal CMError CMMatchPixMap(ComponentInstance CMSession, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMatchPixMap
- dc.w $2F3C
- dc.w $000C
- dc.w $0003
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMatchPixMap
- ENDIF
-
- ;
- ; pascal CMError CMCheckPixMap(ComponentInstance CMSession, const PixMap *myPixMap, CMBitmapCallBackUPP progressProc, BitMap *myBitMap, void *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMCheckPixMap
- dc.w $2F3C
- dc.w $0010
- dc.w $0004
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMCheckPixMap
- ENDIF
-
- ;
- ; pascal CMError CMConcatInit(ComponentInstance CMSession, CMConcatProfileSet *profileSet)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMConcatInit
- dc.w $2F3C
- dc.w $0004
- dc.w $0007
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMConcatInit
- ENDIF
-
- ;
- ; pascal CMError CMNewLinkProfile(ComponentInstance CMSession, CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMNewLinkProfile
- dc.w $2F3C
- dc.w $000C
- dc.w $0010
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMNewLinkProfile
- ENDIF
-
- ;
- ; pascal CMError CMMGetPS2ColorSpace(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMGetPS2ColorSpace
- dc.w $2F3C
- dc.w $0010
- dc.w $000B
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMGetPS2ColorSpace
- ENDIF
-
- ;
- ; pascal CMError CMMGetPS2ColorRenderingIntent(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMGetPS2ColorRenderingIntent
- dc.w $2F3C
- dc.w $0010
- dc.w $000C
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMGetPS2ColorRenderingIntent
- ENDIF
-
- ;
- ; pascal CMError CMMGetPS2ColorRendering(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMGetPS2ColorRendering
- dc.w $2F3C
- dc.w $0014
- dc.w $000D
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMGetPS2ColorRendering
- ENDIF
-
- ;
- ; pascal CMError CMMGetPS2ColorRenderingVMSize(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMMGetPS2ColorRenderingVMSize
- dc.w $2F3C
- dc.w $000C
- dc.w $0011
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMMGetPS2ColorRenderingVMSize
- ENDIF
-
- ;
- ; pascal CMError CMConcatenateProfiles(ComponentInstance CMSession, CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _CMConcatenateProfiles
- dc.w $2F3C
- dc.w $000C
- dc.w $0005
- moveq #0,d0
- dc.w $A82A
- EndM
- ELSE
- IMPORT_CFM_FUNCTION CMConcatenateProfiles
- ENDIF
-
- ENDIF ; __CMMCOMPONENT__
-